package cn.lanchengkeji.datafillingsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 用户主题关联
 * </p>
 *
 * @author yixu
 * @since 2020-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("train_user_subject")
@ApiModel(value="UserSubject对象", description="用户主题关联")
public class UserSubject extends Model<UserSubject> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户ID")
    private Integer userId;

    @ApiModelProperty(value = "主题ID")
    private Integer subjectId;


    public static final String ID = "id";

    public static final String USER_ID = "user_id";

    public static final String SUBJECT_ID = "subject_id";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
